//
//  BCMessageVC.m
//  BananaChat
//
//  Created by 于洪东 on 2019/11/1.
//  Copyright © 2019 香蕉. All rights reserved.
//

#import "BCMessageVC.h"
#import "HXChatViewController.h"

@interface BCMessageVC ()<EaseConversationListViewControllerDelegate>

@end

@implementation BCMessageVC
#pragma mark - ♻️life cycle
- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    self.showRefreshHeader = YES;
    self.delegate = self;
}

-(void)viewWillAppear:(BOOL)animated{
    [super viewWillAppear:animated];
    //首次进入加载数据
    [self tableViewDidTriggerHeaderRefresh];
}


#pragma mark - 🔄overwrite

#pragma mark - 🚪public

#pragma mark - 🍐delegate

#pragma mark - EaseConversationListViewControllerDelegate

- (void)conversationListViewController:(EaseConversationListViewController *)conversationListViewController
            didSelectConversationModel:(id<IConversationModel>)conversationModel{
    EMConversation *conversation = conversationModel.conversation;
    HXChatViewController *chatController = [[HXChatViewController alloc] initWithConversationChatter:conversation.conversationId conversationType:conversation.type];
    chatController.title = conversationModel.title;
    [self.navigationController pushViewController:chatController animated:YES];
}

#pragma mark - ☎️notification

#pragma mark - 🎬event response

#pragma mark - 🔒private

#pragma mark - 🌲setupUI

#pragma mark - ☸getter and setter

@end
